#include <stdio.h>

struct card {
    const char *face;
    const char *suit;
};

typedef struct card Card;

void fill_cards(Card *cars_suit, const char *faces[], const char *suits[]);
void shuffle(Card cars_suit[]);
void print_suit(Card *cars_suit);

int main(int argc, char *argv[])
{
    Card cards_suit[52];
    const char *faces[] = {"红桃", "黑桃", "方块", "梅花"};
    const char *suits[] = {"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"};

    fill_cards(cards_suit, faces, suits);
    print_suit(cards_suit);
    
    return 0;
}

void fill_cards(Card *cars_suit, const char *faces[], const char *suits[])
{
    for (int i = 0; i < 52; i++) {
        cars_suit[i].face = faces[i / 13];
        cars_suit[i].suit = suits[i % 13];
    }
}

void print_suit(Card *cars_suit)
{
    int row_num = 0;
    for (int i = 0; i < 52; i++) {
       row_num++;
       printf("%s%s ", cars_suit[i].face, cars_suit[i].suit);

       if (row_num == 4) {
           row_num = 0;
           printf("\n");
       }
    }
}


